write component form fiven magnitude and direction